package cn.java81.single;

/**
 * @author oldliu
 * @since 1.0
 */
public class Moon {

    private Moon(){
        System.out.println("月亮被构建出来了。。。");
    }
    //内部类。。。
    private  static class Holder{
        public static final Moon inst=new Moon();
    }
    public static Moon getInstance(){
        return Holder.inst;
    }
    public void shine(){
        System.out.println("太阳发着光芒万丈");
    }
}
